package com.hnevc.chenqi;

import com.sun.media.sound.RIFFInvalidDataException;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * 使用FileInputStream读取文件
 *
 *
 */
public class Example02 {
    public static void main(String[] args){
        try {
            FileInputStream in = new FileInputStream("text.txt");
            int b = 0;
            while (true){
                b =in.read();
                if(b== -1){
                    break;
                }
                System.out.println(b);
            }
            in.close();
        }catch (Exception e){
            e.printStackTrace();
        }
 }
}